<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<div id="demo">
			<p v-if="ok">成功了</p>
			<p v-else>失败了</p>
			
			<p v-show="ok">表白成功</p>
			<p v-show="!ok">表白失败</p>
			
			<button @click="ok=!ok">切换</button>
		</div>
		
		<script type="text/javascript" src="js/vue.js"></script>
		<script>
			new Vue({
				el: "#demo",
				data: {
					ok: false
				}
			})
		</script>
	</body>
</html>